From dd78ab5a2f410aebb7aeea72310ac4e515eb6363 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 14 Apr 2011 21:13:48 +0200 Subject: [PATCH] tests: Add test that ensures we properly parse the color red --- tests/css/parser/Makefile.am | 2 + tests/css/parser/colors-red.css | 59 +++++++++++++++++++++++++++++ tests/css/parser/colors-red.ref.css | 59 +++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 tests/css/parser/colors-red.css create mode 100644 tests/css/parser/colors-red.ref.css diff --git a/tests/css/parser/Makefile.am b/tests/css/parser/Makefile.am index 00ee38d559..b3d5f5f0ea 100644 --- a/tests/css/parser/Makefile.am +++ b/tests/css/parser/Makefile.am @@ -34,6 +34,8 @@ EXTRA_DIST += \ close-at-end-of-file.css \ close-at-end-of-file.errors \ close-at-end-of-file.ref.css \ + colors-red.css \ + colors-red.ref.css \ css-21-malformed-declarations.css \ css-21-malformed-declarations.errors \ css-21-malformed-declarations.ref.css \ diff --git a/tests/css/parser/colors-red.css b/tests/css/parser/colors-red.css new file mode 100644 index 0000000000..9d96b95756 --- /dev/null +++ b/tests/css/parser/colors-red.css @@ -0,0 +1,59 @@ +a { + rgba-property: red; +} + +b { + rgba-property: rgba(255,0,0,1.0); +} + +c { + rgba-property: rgb(255,0,0); +} + +d { + rgba-property: rgba(100%,0%,0%,1); +} + +e { + rgba-property: rgb(100%,0,0); +} + +f { + rgba-property: #f00; +} + +g { + rgba-property: #ff0000; +} + +h { + rgba-property: #F00; +} + +i { + rgba-property: #fF0000; +} + +j { + rgba-property: rgba( 255 , 0 , 0 , 1 ) ; +} + +k { + rgba-property: rgb( 255 , 0 , 0 ) ; +} + +l { + rgba-property:/*x*/rgba(/*x*/255/*x*/,/*x*/0/*x*/,/*x*/0/*x*/,/*x*/1/*x*/)/*x*/; +} + +m { + rgba-property:/*x*/rgb(/*x*/255/*x*/,/*x*/0/*x*/,/*x*/0/*x*/)/*x*/; +} + +n { + rgba-property: /*x*/ rgba( /*x*/ 255 /*x*/ , /*x*/ 0 /*x*/ , /*x*/ 0 /*x*/ , /*x*/ 1 /*x*/ ) /*x*/ ; +} + +o { + rgba-property: /*x*/ rgb( /*x*/ 255 /*x*/ , /*x*/ 0 /*x*/ , /*x*/ 0 /*x*/ ) /*x*/ ; +} diff --git a/tests/css/parser/colors-red.ref.css b/tests/css/parser/colors-red.ref.css new file mode 100644 index 0000000000..ba18119fc1 --- /dev/null +++ b/tests/css/parser/colors-red.ref.css @@ -0,0 +1,59 @@ +a { + rgba-property: rgb(255,0,0); +} + +b { + rgba-property: rgb(255,0,0); +} + +c { + rgba-property: rgb(255,0,0); +} + +d { + rgba-property: rgb(255,0,0); +} + +e { + rgba-property: rgb(255,0,0); +} + +f { + rgba-property: rgb(255,0,0); +} + +g { + rgba-property: rgb(255,0,0); +} + +h { + rgba-property: rgb(255,0,0); +} + +i { + rgba-property: rgb(255,0,0); +} + +j { + rgba-property: rgb(255,0,0); +} + +k { + rgba-property: rgb(255,0,0); +} + +l { + rgba-property: rgb(255,0,0); +} + +m { + rgba-property: rgb(255,0,0); +} + +n { + rgba-property: rgb(255,0,0); +} + +o { + rgba-property: rgb(255,0,0); +} -- 2.30.2